<div class="tab-pane " id="lz_game">
	<!--	游戏设置-->
	<div class="panel panel-default" role="tabpanel" style="">
		<div class="panel-heading">宝妈拼拼看</div>
		<div class="panel-body" style="">
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label" style="color: red">宝妈拼拼看总开关</label>
				<div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
					<label class="radio-inline">
						<input name="game_on_off" value="0" {if $config['game_on_off']!=1} checked="checked"{/if} type="radio"> 关闭
					</label>
					<label class="radio-inline">
						<input name="game_on_off" value="1" {if $config['game_on_off']==1} checked="checked"{/if} type="radio"> 开启
					</label>
				</div>
			</div>
<!--			绑定的五锦拼霸王的活动list-->
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">绑定对应的五锦拼霸王的活动</label>
				<?php  $five_koi_list = \app\model\Game::getThemeListByType('five_koi',$themeid);?>
				<div class="col-sm-10 col-xs-12">
					<select class="form-control" name="five_themeid">
						{if $five_koi_list['type_theme_total']>0 }
							{if $five_koi_list['type_theme_total']>=1}
								{loop $five_koi_list['type_theme_list'] $row}
								<option value="{$row['id']}" {if $config['five_themeid'] == $row['id'] }selected="selected"{/if}>跳转到：{$row['id']} - {php echo mb_substr($row['title'],0,25,'utf-8');}</option>
								{/loop}
							{else}
								{loop $five_koi_list['type_theme_list'] $row}
								<option value="{$row['id']}" selected="selected">跳转到：{$row['id']} - {php echo mb_substr($row['title'],0,25,'utf-8');}</option>
								{/loop}
							{/if}
						{/if}
						<option value="0" >缺失对应类型活动-不绑定</option>
					</select>
					<span class="help-block">客户提交完资料后，是提示提交成功停留在本页，还是跳转到的活动页面</span>
				</div>
			</div>
			<!--			通关弹窗提示-->
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">通关弹窗底部提示</label>
				<div class="col-sm-8 col-xs-12">
					<input type="text" class="form-control"  placeholder="" name="pass_level_tips"  value="{php echo empty($config['pass_level_tips'])?'礼品不叠加，通过新的关卡，前面通关礼品自动失效':$config['pass_level_tips'];}">
					<span class="help-block">如：礼品不叠加，通过新的关卡，前面通关礼品自动失效</span>
				</div>
			</div>

<!--	背景音乐-->
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">游戏背景音乐</label>
				<div class="col-sm-3 col-xs-12">
					<select class="form-control" id="game_musictype" name="game_musictype" onchange="changegamemusic();">
						<option value="">请选择音乐分类</option>
					</select>
				</div>
				<div class="col-sm-3 col-xs-12">
					<select class="form-control" id = "game_musicname" name="game_musicname" onchange="changegamemusicname();" >
						<option value="">请选择音乐</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label"></label>
				<div class="col-sm-8 col-xs-12">
					{php echo view_form_field_audio('game_musicsrc',$config['game_musicsrc']);}
					<span class="help-block">mp3文件 不要太大 影响页面加载 用格式工厂压缩一下,控制在1M内</span>
				</div>
			</div>

			<!--	获得宝箱底部提示语-->
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">获得宝箱底部提示语</label>
				<div class="col-sm-8 col-xs-12">
					<input type="text" class="form-control"  placeholder="" name="btm_tips"  value="{php echo empty($config['btm_tips'])?'注：宝箱与通关奖品可同时获得，宝箱不叠加，获得新的宝箱，前面的获得宝箱自动失效':$config['btm_tips'];}">
					<span class="help-block">如：注：宝箱与通关奖品可同时获得，宝箱不叠加，获得新的宝箱，前面的获得宝箱自动失效</span>
				</div>
			</div>
			<!--	获得宝箱底部按钮文字-->
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">获得宝箱底部按钮文字</label>
				<div class="col-sm-8 col-xs-12">
					<input type="text" class="form-control"  placeholder="" name="btn_txt"  value="{php echo empty($config['btn_txt'])?'开心收下':$config['btn_txt'];}">
					<span class="help-block">如：开心收下</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">用户到访限制</label>
				<div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
					<label class="radio-inline">
						<input name="game_guest_limit" value="0" {if $config['game_guest_limit']==0} checked="checked"{/if} type="radio"> 新用户
					</label>
					<label class="radio-inline">
						<input name="game_guest_limit" value="1" {if $config['game_guest_limit']==1} checked="checked"{/if} type="radio"> 新用户+老用户
					</label>

				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">允许员工参加游戏</label>
				<div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
					<label class="radio-inline">
						<input name="game_out_worker" value="0" {if $config['game_out_worker']==0} checked="checked"{/if} type="radio"> 是
					</label>
					<label class="radio-inline">
						<input name="game_out_worker" value="1" {if $config['game_out_worker']==1} checked="checked"{/if} type="radio"> 否
					</label>
					<span class="help-block" style="color:red;">提示：允许员工参加游戏</span>
				</div>
			</div>

			<!--		兑换方式-->
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">奖品兑换方式</label>
				<div class="col-sm-8 col-xs-12">
					<input type="text" class="form-control"  placeholder="" name="convert_type"  value="{php echo empty($config['convert_type'])?'到店兑换':$config['convert_type'];}">
					<span class="help-block">如：到店兑换</span>
				</div>
			</div>
			<!--		兑换地址-->
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">奖品兑换地址</label>
				<div class="col-sm-8 col-xs-12">
					<input type="text" class="form-control"  placeholder="" name="convert_address"  value="{php echo empty($config['convert_address'])?'':$config['convert_address'];}">
					<span class="help-block">如：山东省青岛市李沧区小溪河路185号</span>
				</div>
			</div>
			<!--		兑换有效时间-->
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">奖品兑换有效时间</label>
				<div class="col-sm-5 col-xs-12">
					{php echo view_form_field_daterange('convert_time', array('start'=>date('Y-m-d',$config['convert_time_begintime']),'end'=>date('Y-m-d',$config['convert_time_endtime'])), true);}
					<span class="help-block">奖品兑换有效时间，时间段内兑换有效</span>
				</div>
			</div>
			<!--		兑换方式底部备注-->
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">兑换方式底部备注：</label>
				<div class="col-sm-9 col-xs-12">
					<table class='table'>
						<thead>
						<tr>
							<th>兑换方式内容</th>
							<th>操作</th>
						</tr>
						</thead>
						<tbody id="convert_rule_items">
						{loop $config['game_rules'] $rule_item}
						<tr >
							<td><input name="game_rule_content[]" type="text"
									   class="form-control span3" value="{$rule_item['game_rule_content']}"
							/></td>
							<td>
								<input  name="game_rule_id[]" type="hidden" value="{$game_rule_id['id']}" />
								<a href='javascript:;' onclick='removeRuleItem(this)'><i
										class='glyphicon glyphicon-remove'></i> 删除</a></td>
						</tr>
						{/loop}
						</tbody>
					</table>
					<a href="javascript:;" onclick="addGameRule();"><i class="glyphicon glyphicon-plus" title="添加规则"></i>添加兑换方式</a>
				</div>
			</div>
<!--			玩法说明-->
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">玩法说明：</label>
				<div class="col-sm-9 col-xs-12">
					<table class='table'>
						<thead>
						<tr>
							<th>玩法说明内容</th>
							<th>操作</th>
						</tr>
						</thead>
						<tbody id="play_rule_items">
						{loop $config['play_rules'] $play_rule_item}
						<tr >
							<td><input name="play_rule_content[]" type="text"
									   class="form-control span3" value="{$play_rule_item['play_rule_content']}"
							/></td>
							<td>
								<input  name="play_rule_id[]" type="hidden" value="{$play_rule_id['id']}" />
								<a href='javascript:;' onclick='removePlayRuleItem(this)'><i
										class='glyphicon glyphicon-remove'></i> 删除</a></td>
						</tr>
						{/loop}
						</tbody>
					</table>
					<a href="javascript:;" onclick="addPlayRule();"><i class="glyphicon glyphicon-plus" title="添加规则"></i>添加兑换方式</a>
				</div>
			</div>
		</div>
	</div>

	<div class="panel panel-default" role="tabpanel" style="">
		<div class="panel-heading">跳转设置 </div>
		<div class="panel-body" style="">

			<div class="form-group">
				<label class="col-sm-3 col-xs-12 control-label">绑定对应的五锦拼霸王的活动</label>
				<div class="col-sm-8 col-xs-12">
					<select class="form-control" name="five_themeid">
						{if $five_koi_list['type_theme_total']>0 }
						{if $five_koi_list['type_theme_total']>=1}
						{loop $five_koi_list['type_theme_list'] $row}
						<option value="{$row['id']}" {if $config['five_themeid'] == $row['id'] }selected="selected"{/if}>跳转到：{$row['id']} - {php echo mb_substr($row['title'],0,25,'utf-8');}</option>
						{/loop}
						{else}
						{loop $five_koi_list['type_theme_list'] $row}
						<option value="{$row['id']}" selected="selected">跳转到：{$row['id']} - {php echo mb_substr($row['title'],0,25,'utf-8');}</option>
						{/loop}
						{/if}
						{/if}
						<option value="0" >不跳转</option>
					</select>
				</div>
			</div>
			<!--首页进入游戏浮标-->
			<div class="form-group">
				<label class="col-sm-3 col-xs-12 control-label">拼团首页【进入五锦拼霸王】浮标</label>
				<div class="col-sm-8 col-xs-12">
					{php echo view_form_field_image('pintuan_to_koi_icon',$config['pintuan_to_koi_icon']);}
				</div>
			</div>
			<!--首页进入游戏浮标-->
			<div class="form-group">
				<label class="col-sm-3 col-xs-12 control-label">宝妈拼拼看【进入五锦拼霸王】浮标</label>
				<div class="col-sm-8 col-xs-12">
					{php echo view_form_field_image('game_to_koi_icon',$config['game_to_koi_icon']);}
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 col-xs-12 control-label">拼团首页【进入游戏】浮标</label>
				<div class="col-sm-8 col-xs-12">
					{php echo view_form_field_image('enter_lz_game_icon',$config['enter_lz_game_icon']);}
				</div>
			</div>
			<!--	设置进入游戏图片-->
			<div class="form-group">
				<label class="col-sm-3 col-xs-12 control-label">拼团首页【进入游戏】Banner图</label>
				<div class="col-sm-8 col-xs-12">
					{php echo view_form_field_image('lz_game_img',$config['lz_game_img']);}
					<span class="help-block">注：请先确定进入游戏图片位置</span>
				</div>
			</div>
			<!--	进入游戏图片位置-->
			<div class="form-group">
				<label class="col-sm-3 col-xs-12 control-label">拼团首页【进入游戏】显示位置</label>
				<div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
					<label class="radio-inline">
						<input name="lz_game_img_position" value="1" {if $config['lz_game_img_position']==1} checked="checked"{/if} type="radio"> 图文内容上方
					</label>
					<label class="radio-inline">
						<input name="lz_game_img_position" value="0" {if $config['lz_game_img_position']==0} checked="checked"{/if} type="radio"> 图文内容下方
					</label>
				</div>
			</div>
			<!--	支付凭证顶部图-->
			<div class="form-group">
				<label class="col-sm-3 col-xs-12 control-label">支付凭证顶部【进入游戏】Banner图</label>
				<div class="col-sm-8 col-xs-12">
					{php echo view_form_field_image('lz_game_pay_card_img',$config['lz_game_pay_card_img']);}
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 col-xs-12 control-label">支付凭证【五连抽】弹窗</label>
				<div class="col-sm-8 col-xs-12">
					{php echo view_form_field_image('pay_to_koi',$config['pay_to_koi']);}
				</div>
			</div>
		</div>
	</div>
</div>
<script>
	function addGameRule(){
		var html = "<tr>";
		html += '<td><input name="game_rule_content[]" type="text" class="form-control span3" value="" /></td>';
		html += '<td> <input  name="game_rule_id[]" type="hidden" value="" />&nbsp;<a href="javascript:;" onclick="removeGameRuleItem(this)" ><i class="glyphicon glyphicon-remove"></i> 删除</a></td>';
		html += "</tr>";
		$("#convert_rule_items").append(html);
	}
	function removeGameRuleItem(obj) {
		$(obj).parent().parent().remove();
	}


	function addPlayRule(){
		var html = "<tr>";
		html += '<td><input name="play_rule_content[]" type="text" class="form-control span3" value="" /></td>';
		html += '<td> <input  name="play_rule_id[]" type="hidden" value="" />&nbsp;<a href="javascript:;" onclick="removePlayRuleItem(this)" ><i class="glyphicon glyphicon-remove"></i> 删除</a></td>';
		html += "</tr>";
		$("#play_rule_items").append(html);
	}


	function removePlayRuleItem(obj) {
		$(obj).parent().parent().remove();
	}
</script>


